<b><{$category_path}></b>
<br />
<h2><{$formtitle}>: <{if $download.title}><{$download.title}><{/if}></h2>
<form name="makedownloadform" id="makedownloadform" action="<{$mod_url}>/index.php?page=<{$page}>&amp;lid=<{$download.lid}>" method="post" enctype="multipart/form-data">
	<{$gticket_hidden}>
	<input type="hidden" name="lid" value="<{$download.lid}>" />
	<input type="hidden" name="submitter" value="<{$download.submitter}>" />
	<input type="hidden" name="filename" value="<{$download.filename}>" />
	<input type="hidden" name="ext" value="<{$download.ext}>" />
	<table class="outer">
		<tr valign="top" align="left">
			<td class="head"><label for="title"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_TITLE}></label></td>
			<td class="even">
				<input type="text" name="title" id="title" size="50" maxlength="199" value="<{$download.title}>" />
			</td>
		</tr>
		<{if $download.lid}>
			<tr valign="top" align="left">
				<td class="head"><label for="postname"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_POSTNAME}></label></td>
				<td class="even">
					<{if $download.user_url}>
						<a href="<{$download.user_url}>" rel="nofollow"><{$download.postname}></a>
					<{else}>
						<{$download.postname}>
					<{/if}>
				</td>
			</tr>
		<{/if}>
		<tr valign="top" align="left" id="file_url_line">
			<td class="head">
				<label for="url"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_URL}></label></td>
			<td class="even">
				<input type="text" name="url" id="url" size="90" maxlength="250" value="<{if $download.url}><{$download.url}><{else}>http://<{/if}>" />
				<input type="hidden" name="MAX_FILE_SIZE" value="<{$upload_max_filesize}>" />
				<input type="file" name="file_upload" id="file_upload" size="25" maxlength="255" pre_style="display;"}>
				<div id="max_submit_size">
					<{$max_submit_size}>
				</div>
				<{if $download.url}>
					&nbsp;<{$download.filelink}>
				<{/if}>
				<br />
				<{if ! $config_error}>
					<input type="checkbox" id="file_url_onoff" onClick="file_url_line_showhide()">&nbsp;<label for="body_bbcode_onoff"><{$smarty.const._MD_D3DOWNLOADS_LABEL_INPUT_URL}></label>
				<{/if}>
			</td>
		</tr>
		<{if $download.filename}>
			<tr valign="top" align="left">
				<td class="head"><label for="filename"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_FILENAME}></label></td>
				<td class="even">
					<{$download.filename}><br>
				</td>
			</tr>
		<{/if}>
		<tr valign="top" align="left">
			<td class="head"><label for="cid"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_CATEGORY}></label></td>
			<td class="even">
				<select name="cid" id="cid"><br>
					<{html_options options=$download.category selected=$download.cid}><br>
				</select>
			</td>
		</tr>
		<tr valign="top" align="left">
			<td class="head"><label for="homepage"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_HOMEPAGE}></label></td>
			<td class="even">
				<input type="text" name="homepage" id="homepage" size="90" maxlength="100" value="<{if $download.homepage}><{$download.homepage}><{else}><{$xoopshp}><{/if}>" />
				<{if $download.homepage}>
					&nbsp;[<a href="<{$download.homepage}>" rel="nofollow"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_ACCESS_URL}></a>]
				<{/if}>
			</td>
		</tr>
		<tr valign="top" align="left">
			<td class="head"><label for="version"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_VERSION}></label></td>
			<td class="even">
				<input type="text" name="version" id="version" size="10" maxlength="10" value="<{$download.version}>" />
			</td>
		</tr>
		<tr valign="top" align="left">
			<td class="head"><label for="size"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_SIZE}></label></td>
			<td class="even">
				<input type="text" name="size" id="size" size="8" maxlength="8" value="<{$download.size}>" />&nbsp;<{$smarty.const._MD_D3DOWNLOADS_SUBMIT_BYTE}>
				<div id="submit_size_desc">
					&nbsp;<{$smarty.const._MD_D3DOWNLOADS_SUBMIT_SIZE_DESC}>
				</div>
			</td>
		</tr>
		<tr valign="top" align="left">
			<td class="head"><label for="platform"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_PLATFORM}></label></td>
			<td class="even">
				<input type="text" name="platform" id="platform" size="50" maxlength="50" value="<{$download.platform}>" />
				<select name="select_platform" id="select_platform" onchange="if(this.value){xoopsGetElementById('platform').value=xoopsGetElementById('platform').value?xoopsGetElementById('platform').value+'&nbsp;'+this.value:this.value;}">
					<{html_options options=$select_platform}>
				</select>
			</td>
		</tr>
		<tr valign="top" align="left">
			<td class="head"><label for="description"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_DESCRIPTION}></label></td>
			<td class="even">
				<{xoopsdhtmltarea name="description" cols="60" rows="15" value=$download.description"}><br />
				<{$smarty.const._MD_D3DOWNLOADS_SUBMIT_DESCRIPTION_DESC}>
			</td>
		</tr>
		<{if $canuseshots}>
			<tr valign="top" align="left">
				<td class="head"><label for="logourl"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_LOGOURL}></label></td>
				<td class="even">
					<select name="logourl" id="logourl"><br>
						<{html_options options=$downimg selected=$download.logourl}><br>
					</select><br />
					<{if $shots_help}>
						<{$shots_help}>
					<{/if}>
				</td>
			</tr>
		<{/if}>
		<tr valign="top" align="left">
			<td class="head"><label for="option"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_OPTION}></label></td>
			<td class="even">
				<{if $canhtml}>
					<label for="html"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_HTML}></label>
					<input type="checkbox" name="html" id="html" value="1" <{if $download.html}>checked="checked"<{/if}> /><br />
				<{/if}>
				<label for="smiley"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_SMILEY}></label>
				<input type="checkbox" name="smiley" id="smiley" value="1" <{if $download.smiley}>checked="checked"<{/if}> /><br />
				<label for="br"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_BR}></label>
				<input type="checkbox" name="br" id="br" value="1" <{if $download.br}>checked="checked"<{/if}> /><br />
				<label for="xcode"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_XCODE}></label>
				<input type="checkbox" name="xcode" id="br" value="1" <{if $download.xcode}>checked="checked"<{/if}> /><br />
				<label for="visible"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_VISIBLE}></label>
				<input type="checkbox" name="visible" id="visible" value="1" <{if $download.visible}>checked="checked"<{/if}> /><br />
				<label for="comment"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_COMMENT}></label>
				<input type="checkbox" name="comment" id="comment" value="1" <{if $download.cancomment}>checked="checked"<{/if}> /><br />
				<{if $download.lid}>
					<label for="dateoption"><{$smarty.const._MD_D3DOWNLOADS_SUBMIT_DATEOPTION}></label>
					<input type="checkbox" name="dateoption" id="dateoption" value="1" />
				<{/if}>
			</td>
		</tr>
		<tr valign="top" align="left">
			<td class="head"></td>
			<td class="even">
				<input type="submit" class="formButton" name="makedownload_post" id="makedownload_post" value="<{$smarty.const._MD_D3DOWNLOADS_BTN_SUBMITEDITING}>" />
				<{if $candelete}>
					<input type="submit" name="makedownloadform_delete" value="<{$smarty.const._DELETE}>" onclick="return confirm('<{$smarty.const._MD_D3DOWNLOADS_MSG_CONFIRMDELETECONTENT}>')" />
				<{/if}>
				<input name="back" type="button" value="<{$smarty.const._MD_D3DOWNLOADS_BTN_CANSEL}>" onclick='location.href="<{$mod_url}>/index.php"'/>
			</td>
		</tr>
	</table>
</form>
<!-- LiveValidator START -->
<script>
<{$liveValidator}>
</script>
<!-- LiveValidator END -->
<br />
<font color="#FF0000"><b><{$smarty.const._MD_D3DOWNLOADS_HISTORY}></b></font><br />
<{foreach from=$history item="history"}>
	<{$history.history_date}> : <{$history.history_title}> <a href="<{$mod_url}>/admin/index.php?page=history&amp;id=<{$history.history_id}>"><{$smarty.const._MD_D3DOWNLOADS_VIEWHISTORY}></a><br />
<{/foreach}>
<br /><br />
<form name="delbroken" id="delbroken" action="<{$mod_url}>/admin/index.php?page=delbroken" method="post">
<input type="hidden" name="cid" value="<{$download.cid}>" />
<input type="hidden" name="lid" value="<{$download.lid}>" />
<table class="outer">
	<tr>
		<td style="text-align:center;" colspan="7">
			<b><{$totalbroken}></b>
		</td>
	</tr>
	<tr>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_SENDERNAME}></b>
		</th>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_IP}></b>
		</th>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_BROKENDEL}></b>
		</th>
	</tr>
<{if ! $broken}>
	<tr>
		<td style="text-align:center;" align="center" colspan="3">
			<{$smarty.const._MD_D3DOWNLOADS_NOBROKEN}><br />
		</td>
	</tr>
<{else}>
	<{foreach from=$broken item=broken name=broken}>
		<tr class="<{cycle values="even,odd"}>">
			<td style="text-align:center;">
				<{if $broken.sender_url}>
					<a href="<{$broken.sender_url}>" rel="nofollow"><{$broken.sendername}></a>
				<{else}>
					<{$broken.sendername}>
				<{/if}>
			</td>
			<td style="text-align:center;">
				<{$broken.ip}>
			</td>
<{if ($smarty.foreach.broken.iteration) == 1}>
			<td rowspan="<{$brokensum}>" style="text-align:center;">
					<input type="submit" name="delbroken_post" id="delbroken_post" value="X" onclick="return confirm('<{$smarty.const._MD_D3DOWNLOADS_MSG_CONFIRMDELETECONTENT}>')" />
			</td>
<{/if}>
		</tr>
	<{/foreach}>
	</td>
	<tr>
<{/if}>
</table>
</form>
<br />
<form name="delvote" id="delvote" action="<{$mod_url}>/admin/index.php?page=delvote" method="post">
<input type="hidden" name="cid" value="<{$download.cid}>" />
<input type="hidden" name="lid" value="<{$download.lid}>" />
<div align="center">
	<b><{$totalvotes}></b>
</div>
<table class="outer">
	<tr>
		<td style="text-align:center;" colspan="7">
			<b><{$user_totalvote}></b>
		</td>
	</tr>
	<tr>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_USER}></b>
		</th>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_IP}></b>
		</th>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_RATINGC}></b>
		</th>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_MD_USERAVG}></b>
		</th>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_MD_TOTALRATE}></b>
		</th>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_VOTE_DATE}></b>
		</th>
		<th style="text-align:center;">
			<b><{$smarty.const._DELETE}></b>
		</th>
	</tr>
<{if ! $user_vote}>
	<tr>
		<td style="text-align:center;" align="center" colspan="7">
			<{$smarty.const._MD_D3DOWNLOADS_NOREGVOTES}><br />
		</td>
	</tr>
<{else}>
	<{foreach from=$user_vote item="user_vote"}>
		<tr class="<{cycle values="even,odd"}>">
			<td style="text-align:center;">
				<a href="<{$user_vote.ratinguserurl}>"><{$user_vote.ratingusername}></a>
			</td>
			<td style="text-align:center;">
				<{$user_vote.ratinghostname}>
			</td>
			<td style="text-align:center;">
				<{$user_vote.rating}>
			</td>
			<td style="text-align:center;">
				<{$user_vote.useravgrating}>
			</td>
			<td style="text-align:center;">
				<{$user_vote.uservotes}>
			</td>
			<td style="text-align:center;">
				<{$user_vote.ratingtimestamp}>
			</td>
			<td style="text-align:center;">
				<input type="submit" name="delvote[<{$user_vote.id}>]" id="delvote[<{$user_vote.id}>]" value="X" onclick="return confirm('<{$smarty.const._MD_D3DOWNLOADS_MSG_CONFIRMDELETECONTENT}>')" />
			</td>
		</tr>
	</td>
	<{/foreach}>
	<tr>
<{/if}>
</table>
<br />
<table class="outer">
	<tr>
		<td style="text-align:center;" colspan="7">
			<b><{$guest_totalvote}></b>
		</td>
	</tr>
	<tr>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_IP}></b>
		</th>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_RATINGC}></b>
		</th>
		<th style="text-align:center;">
			<b><{$smarty.const._MD_D3DOWNLOADS_VOTE_DATE}></b>
		</th>
		<th style="text-align:center;">
			<b><{$smarty.const._DELETE}></b>
		</th>
	</tr>
<{if ! $guest_vote}>
	<tr>
		<td style="text-align:center;" colspan="4">
			<{$smarty.const._MD_D3DOWNLOADS_NOGUESTVOTES}><br />
		</td>
	</tr>
<{else}>
	<{foreach from=$guest_vote item="guest_vote"}>
		<tr class="<{cycle values="even,odd"}>">
			<td style="text-align:center;">
				<{$guest_vote.ratinghostname}>
			</td>
			<td style="text-align:center;">
				<{$guest_vote.rating}>
			</td>
			<td style="text-align:center;">
				<{$guest_vote.ratingtimestamp}>
			</td>
			<td style="text-align:center;">
				<input type="submit" name="delvote[<{$guest_vote.id}>]" id="delvote[<{$guest_vote.id}>]" value="X" onclick="return confirm('<{$smarty.const._MD_D3DOWNLOADS_MSG_CONFIRMDELETECONTENT}>')" />
			</td>
		</tr>
	</td>
	<{/foreach}>
	<tr>
<{/if}>
</table>
</form>

<script type="text/javascript">
function file_url_line_showhide(){
	if( shflag ){
		shflag=false ;xoopsGetElementById("file_upload").style.display="none";xoopsGetElementById("max_submit_size").style.display="none";xoopsGetElementById("submit_size_desc").style.display="none";xoopsGetElementById("url").style.display="inline";xoopsGetElementById("access_url").style.display="inline";
	} else {
		shflag=true;xoopsGetElementById("file_upload").style.display="inline";xoopsGetElementById("max_submit_size").style.display="inline";xoopsGetElementById("submit_size_desc").style.display="inline";xoopsGetElementById("url").style.display="none";xoopsGetElementById("access_url").style.display="none";
	}
}
shflag=true;file_url_line_showhide()
</script>
